#ifndef FLUID_SCENE_H
#define FLUID_SCENE_H

#include <NxScene.h>
#include <NxVec3.h>

#include "..\_Utils\src\Scene.h"
#include "..\_Utils\src\DevilTexture.h"
#include "..\_Utils\src\modelloader\Model.h"

#include "Renderer.h"
#include "PhysxLogic.h"
#include "Particle.h"
#include "ParticlesContainer.h"

class FluidScene : Scene
{
private:
    enum PARTICLES_CONTAINER {
        PARTICLES_CONTAINER_WATER,
        PARTICLES_CONTAINER_RAYFLUID,
        PARTICLES_CONTAINER_COUNT
    };
    ParticlesContainer differentParticles[2];

    DevilTexture *fluidTexture;
    DevilTexture *groundTexture;
    Log *modelLog;
    Model *model;
    NxActor *modelActor;
    NxActor *groundActor;
public:
    FluidScene();
    ~FluidScene();

    void PrepareScene(NxScene *scene);
    void CleanScene();

    void CreateBoxPyramid(int maxNumber, const NxVec3 &boxSize, const NxVec3 &position);
    void CreateWaterFountain(int maxParticles, const NxVec3 &position);
    void CreateFluidRay(int maxParticles, int emitterRate, const NxMat34 &pose);

    void Update();
    void Draw();

    void HandleKeyboardEvent(unsigned char key, int x, int y);
    void HandleKeyboardSpecialEvent(int key, int x, int y);
    void HandleMouseClickEvent(int button, int state, int x, int y);
    void HandleMousePressedMovementEvent(int x, int y, int dx, int dy);
};

#endif //FLUID_SCENE_H
